﻿<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Easyui扩展库 Tabs - 落阳 整理</title>
    <link href="http://www.easyui-extlib.com/Content/Site.css" rel="stylesheet" />
    <script src="http://www.easyui-extlib.com/Scripts/jquery/jquery-1.11.0.min.js"></script>
    <script src="http://www.easyui-extlib.com/Scripts/jquery-extensions/jquery.jdirk.js"></script>
    <link href="http://www.easyui-extlib.com/Scripts/jquery-easyui/jquery-easyui-1.4.3/themes/default/easyui.css" rel="stylesheet" />
    <link href="http://www.easyui-extlib.com/Scripts/jquery-easyui/jquery-easyui-1.4.3/themes/icon.css" rel="stylesheet" />
    <script src="http://www.easyui-extlib.com/Scripts/jquery-easyui/jquery-easyui-1.4.3/jquery.easyui.min.js"></script>
    <script src="http://www.easyui-extlib.com/Scripts/jquery-easyui/jquery-easyui-1.4.3/locale/easyui-lang-zh_CN.js"></script>

    <script src="http://www.easyui-extlib.com/Scripts/jquery-easyui-extensions/tabs/jeasyui.extensions.tabs.setTitle.js"></script>
    <script>
        $(function () {

            $("a[id^='btnSetTabTitle']").click(function () {
                var id = $(this).attr("id"),
                    order = id.split("_")[1],
                    title = "标签页" + order;
                if (!$("#tabs1").tabs("exists", title)) { return; }
                $("#tabs1").tabs("setTitle", { which: title, title: "<span style='color:red;'>标签页</span>" + order + order });
            });
        });

    </script>
</head>
<body>
    <div id="tabs1" class="easyui-tabs" data-options="fit:true,border:false">
        <div data-options="title:'标签页1',closable:false,iconCls:'icon-add'" style="padding:15px;">
            标签页1
            <br />
            <a id="btnSetTabTitle_1" class="easyui-linkbutton" data-options="iconCls:'icon-add'">重设当前标签页的标题</a>
        </div>
        <div data-options="title:'标签页2',closable:true,iconCls:'icon-edit',selected:true" style="padding:15px;">
            标签页2
            <br />
            <a id="btnSetTabTitle_2" class="easyui-linkbutton" data-options="iconCls:'icon-add'">重设当前标签页的标题</a>
        </div>
        <div data-options="title:'标签页3',closable:false,iconCls:'icon-remove'" style="padding:15px;">
            标签页3
            <br />
            <a id="btnSetTabTitle_3" class="easyui-linkbutton" data-options="iconCls:'icon-add'">重设当前标签页的标题</a>
        </div>
    </div>
</body>
</html>
